package junit;

import values.FantaString;
import instructions.*;
import expressions.*;
import base.Identifier;
import base.Interpreter;

public class inAndOut {

	public static void main (String[] args) {
		
		/*
		 * local (a) {
		 *   
		 *   print("Enter something ...");
		 *   a = input();
		 *   print("You entered :");
		 *   print(a);
		 * }
		 * 
		 */
		
		Identifier a = new Identifier("a");
		
		Print first = new Print(new FantaString("Enter something ..."));
		
		Input in = new Input();
		VariableAssign inAssign = new VariableAssign(a, in);
		
		Composition inCompo = new Composition(first, inAssign);
		
		Print second = new Print(new FantaString("You entered :"));
		Print out = new Print(new VariableAccess(a));
		
		Composition outCompo = new Composition(second, out);
		
		Composition compo = new Composition(inCompo, outCompo);
		
		Local local = new Local(a, compo);
		
		Interpreter.instr(local);
		
	}
	
}
